Skip to content

fix: remove runtime dependency installation#136

Merged
sidmohan0 merged 2 commits into
devfrom
sidmohan0/dfpy-18-runtime-install-downloads
Apr 27, 2026
Merged

fix: remove runtime dependency installation#136
sidmohan0 merged 2 commits into
devfrom
sidmohan0/dfpy-18-runtime-install-downloads

Conversation

@sidmohan0
Copy link
Copy Markdown
Contributor

Summary

Removes hidden runtime environment mutation from optional SDK paths.

  • Replaces Spark/PySpark runtime pip install helpers with clear optional-extra errors.
  • Stops spaCy annotators from auto-downloading models during normal SDK use; missing models now point to explicit datafog download-model ... guidance.
  • Loads GLiNER models with local_files_only=True during normal SDK use, while preserving the explicit CLI download path.
  • Stops Donut OCR from installing torch / transformers at runtime and loads Donut model artifacts from local cache only.
  • Adds pyspark to the distributed extra so Spark install guidance is accurate.
  • Updates CI/release setup to explicitly download the GLiNER model before nlp-advanced tests.
  • Adds regression tests covering no runtime package installs and missing optional dependency errors.

Validation

  • .venv313/bin/python -m black --check ... passed for changed Python files.
  • .venv313/bin/python -m pytest tests/test_runtime_dependency_safety.py tests/test_donut_lazy_import.py tests/test_gliner_annotator.py tests/test_engine_api.py tests/test_client.py -q passed: 55 passed, 2 expected fallback warnings.
  • .venv313/bin/python -m pytest tests/ -m "not slow" --ignore=tests/test_image_service.py --ignore=tests/test_ocr_integration.py --ignore=tests/test_spark_integration.py --ignore=tests/test_text_service_integration.py -q passed: 516 passed, 10 skipped, 291 deselected, 19 xfailed.
  • .venv313/bin/python setup.py egg_info passed, with existing setuptools license-classifier warning.
  • .venv313/bin/python -m pip install --dry-run -e ".[distributed]" resolved and showed pyspark included in the distributed extra.
  • .venv313/bin/python -m pytest tests/test_spark_integration.py -q skipped cleanly without installing PySpark.
  • .venv313/bin/python -m pip check passed.
  • git diff --check passed.

Note: tests/test_ocr_integration.py cannot collect in this core-only venv because PIL is intentionally absent; OCR integration remains an optional-profile test.

@sidmohan0 sidmohan0 marked this pull request as ready for review April 27, 2026 02:00
@sidmohan0 sidmohan0 merged commit 8bdd56e into dev Apr 27, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant